using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db;
using HengTong.Model.Db.Hr;


namespace HengTong.ViewModel.Person.SysPersonProfessionalTitleVms
{
    public partial class SysPersonProfessionalTitleTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工")]
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.PersonId);
        [Display(Name = "资质类别")]
        public ExcelPropety ProfessionalTitleTypeExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.ProfessionalTitleTypeId);
        [Display(Name = "资质名称")]
        public ExcelPropety QualificationNameExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.QualificationName);
        [Display(Name = "资质等级")]
        public ExcelPropety QualificationLevelExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.QualificationLevel);
        [Display(Name = "发证单位")]
        public ExcelPropety IssuingAuthorityExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.IssuingAuthority);
        [Display(Name = "证书编码")]
        public ExcelPropety CertificateCodeExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.CertificateCode);
        [Display(Name = "获得日期")]
        public ExcelPropety ObtainedDateExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.ObtainedDate);
        [Display(Name = "有效期")]
        public ExcelPropety ExpiryDateExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.ExpiryDate);
        [Display(Name = "薪资奖励")]
        public ExcelPropety SalaryRewardExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.SalaryReward);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysPersonProfessionalTitle>(x => x.Remark);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
            ProfessionalTitleTypeExcel.DataType = ColumnDataType.ComboBox;
            ProfessionalTitleTypeExcel.ListItems = DC.Set<SysPersonProfessionalTitleType>().GetSelectListItems(Wtm, y => y.CategoryName);
        }

    }

    public class SysPersonProfessionalTitleImportVm : BaseImportVM<SysPersonProfessionalTitleTemplateVm, SysPersonProfessionalTitle>
    {

    }

}
